<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    * {
      margin: 0;
      padding: 0;
    }

    .list {
      width: 300px;
      margin: 50 auto 0;
    }

    .list-title {
      height: 40px;
    }

    .list-title a {
      float: left;
      width: 100px;
      height: 40px;
      text-align: center;
      line-height: 40px;
      background-color: #aaa;
      color: #fff;
      text-decoration: none;
    }

    .list-title .active {
      background-color: #ddd;
      color: #333;
    }

    .list-body p {
      text-align: center;
      padding: 10px 0;
      border: 1px solid #999;
      border-top: none;
    }
  </style>
</head>

<body>
  <div id="app">
    <div class="list">
      <div class="list-title">
        <a href="javascript:;" v-on:click="curId=0" :class="{active: curId==0}">HTML</a>
        <a href="javascript:;" v-on:click="curId=1" :class="{active: curId==1}">CSS</a>
        <a href="javascript:;" v-on:click="curId=2" :class="{active: curId==2}">JS</a>
      </div>

      <div class="list-body">
        <p v-show="curId==0">超文本标记语言</p>
        <p v-show="curId==1">层叠样式表</p>
        <p v-show="curId==2">脚本语言</p>
      </div>
    </div>
  </div>

  <script src="https://lib.baomitu.com/vue/2.6.14/vue.js"></script>
  <script>
    let vm = new Vue({
      el: '#app',
      data: {
        curId: 0
      }
    })
  </script>
</body>

</html>